package com.lvcoding.auth2.auth.shizhan.security;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;

/**
 * 自定义oauth2异常
 *
 * @author wuyanshen
 */

@JsonSerialize(using = CustomOAuth2ExceptionSerializer.class)
public class CustomOauth2Exception extends OAuth2Exception {

    public CustomOauth2Exception(String msg, Throwable t) {
        super(msg, t);
    }

    public CustomOauth2Exception(String msg) {
        super(msg);
    }

    @Override
    public int getHttpErrorCode() {
        return 400;
    }
}
